﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace WindowsGame2
{
    static class LoadHelper
    {
        public static Dictionary<TextureEnum, Texture> Textures;
        public static Dictionary<EffectEnum, Effect> Effects;
        public static Dictionary<FontEnum, SpriteFont> Fonts;
        public static Dictionary<ModelEnum, Model> Models;

        public static void Load(ContentManager content)
        {
            LoadTextures(content);
            LoadEffects(content);
            LoadFonts(content);
            LoadModels(content);
        }

        public static void LoadTextures(ContentManager content)
        {
            Textures = new Dictionary<TextureEnum, Texture>();
            //Textures.Add(TextureEnum.default_bump_normal, content.Load<Texture>(@"Textures\default_bump_normal"));
            //Textures.Add(TextureEnum.default_color,content.Load<Texture>(@"Textures\default_color"));
            //Textures.Add(TextureEnum.default_reflection,content.Load<Texture>(@"Textures\default_reflection"));
            //Textures.Add(TextureEnum.particle,content.Load<Texture>(@"Textures\particle"));
            //Textures.Add(TextureEnum.skybox, content.Load<Texture>(@"Textures\SpaceSkyCubeMap"));
            Textures.Add(TextureEnum.skybox, content.Load<Texture>(@"Textures\skybox"));
        }

        public enum TextureEnum
        {
            default_bump_normal,
            default_color,
            default_reflection,
            particle,
            skybox
        }

        public static void LoadEffects(ContentManager content)
        {
            Effects = new Dictionary<EffectEnum, Effect>();
            Effects.Add(EffectEnum.skybox, content.Load<Effect>(@"Effects\skybox"));
        //    Effects.Add(EffectEnum.lightEffect, content.Load<Effect>(@"Effects\Light"));
        //    Effects.Add(EffectEnum.glowEffect, content.Load<Effect>(@"Effects\Glow"));
        //    Effects.Add(EffectEnum.postGlow, content.Load<Effect>(@"Effects\postGlow"));
        //    Effects.Add(EffectEnum.fireEffect, content.Load<Effect>(@"Effects\Fire"));
        //    Effects.Add(EffectEnum.ocean, content.Load<Effect>(@"Effects\Ocean"));
        }

        public enum EffectEnum
        {
            lightEffect,
            glowEffect,
            postGlow,
            fireEffect,
            skybox,
            ocean
        }

        public enum FontEnum
        {
            casual
        }

        public static void LoadFonts(ContentManager content)
        {
            Fonts = new Dictionary<FontEnum, SpriteFont>();
            //Fonts.Add(FontEnum.casual, content.Load<SpriteFont>(@"Fonts\casual"));
        }
        public enum ModelEnum
        {
            basketball,
            box,
            teapot,
            skybox,
            plane,
            airplane
        }

        public static void LoadModels(ContentManager content)
        {
            Models = new Dictionary<ModelEnum, Model>();
            Models.Add(ModelEnum.basketball, content.Load<Model>(@"Models\basketball"));
            Models.Add(ModelEnum.airplane, content.Load<Model>(@"Models\airplane"));
            //Models.Add(ModelEnum.teapot, content.Load<Model>(@"Models\teapot"));
            Models.Add(ModelEnum.skybox, content.Load<Model>(@"Models\skybox"));
            //Models.Add(ModelEnum.plane, content.Load<Model>(@"Models\plane"));

        }
    }
}
